from main import create_app  # Changed from 'app' to 'main'
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)

@app.route('/')
def index():
    return send_from_directory(static_dir, 'index.html')

@app.route('/<path:path>')
def static_files(path):
    return send_from_directory(static_dir, path)
from flask import send_from_directory
import os

# 获取项目根目录的绝对路径
root_dir = os.path.dirname(os.path.abspath(__file__))
static_dir = os.path.join(root_dir, 'static')

app = create_app()

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

# 确保必要的目录存在
os.makedirs(app.instance_path, exist_ok=True)
os.makedirs(app.config['DOWNLOAD_DIR'], exist_ok=True)
os.makedirs(os.path.dirname(app.config['LOG_FILE']), exist_ok=True)